<!--
 * @Description: 
 * @Date: 2023-04-07 20:23:43
 * @LastEditTime: 2023-04-10 19:45:46
 * @Author: Black
 * @FilePath: \store_admin\src\components\SearchForm.vue
-->
<template>
  <div class="search_form">
    <el-form :model="model" label-width="80px" class="w-[850px]">
      <el-row :gutter="20">
        <slot></slot>

        <el-col :span="6" :offset="0">
          <div class="flex items-center">
            <el-button class="btn1" @click="$emit('search')">搜索</el-button>
            <el-button class="btn2" @click="$emit('reset')">重置</el-button>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script setup>

defineProps({
  model: Object
})

defineEmits(["search", "reset"])

</script>

<style scoped>
.search_form {
  position: absolute;
  left: 275px;
}

.btn1 {
  @apply bg-gray-400 text-light-50;
  height: 34px;
  width: 55px;
  border-radius: 10px;
  border: none;
  color: #fff;
  cursor: pointer;
}
.btn2 {
  @apply bg-indigo-300 text-light-50;
  height: 34px;
  width: 55px;
  border-radius: 10px;
  border: none;
  color: #fff;
  cursor: pointer;
}
.btn1:hover {
  box-shadow: 0 0 5px rgba(119, 119, 119, 0.5);
}
.btn2:hover {
  box-shadow: 0 0 5px rgba(147, 164, 244, 0.5);
}</style>